﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using System.Runtime.Serialization.Formatters.Binary;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace FrameDetectionTest.Interface
{
    public partial class Version : Form
    {
        public Version()
        {
            InitializeComponent();
        }

        private void Version_Load(object sender, EventArgs e)
        {
            string path = AppDomain.CurrentDomain.BaseDirectory + "version.txt"; 
            if(!File.Exists(path))
            {
                MessageBox.Show("版本文件不存在");
            }
            else
            {
                try
                {
                    string line = "";
                    using (StreamReader sr = new StreamReader(path))
                    {
                        while ((line = sr.ReadLine()) != null)
                        {
                            
                            VersionTextBox.AppendText(line);
                            VersionTextBox.AppendText("\n");
                            VersionTextBox.ScrollToCaret();
                        }
                    }
                }
                catch
                {

                }
            }
        }
    }
}
